<template>
  <div style="height: 100%">
    <div>
      <el-row :gutter="40">
        <el-col :span="12">
          <label>学生风采</label>
        </el-col>
        <el-col :span="12">
          <label>教师风采</label>
        </el-col>
      </el-row>
    </div>
    <div style="margin-top: 40px">
      <el-row :gutter="40">
        <el-col :span="12">
          <el-carousel :interval="4000" type="card" height="400px">
            <el-carousel-item v-for="item in imgs" :key="item">
              <el-image :src="item"></el-image>
            </el-carousel-item>
          </el-carousel>
        </el-col>
        <el-col :span="12">
          <el-carousel trigger="click" height="400px">
            <el-carousel-item v-for="item in imgs" :key="item">
              <el-image :src="item"></el-image>
            </el-carousel-item>
          </el-carousel>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'a',
      imgs: [
        require('@/assets/1.jpg'),
        require('@/assets/2.jpg'),
        require('@/assets/3.jpg'),
        require('@/assets/4.jpg'),
        require('@/assets/5.jpg'),
        require('@/assets/6.jpg')
      ]
    }
  },
  methods: {
  },
  computed: mapState({
    userLogin: 'userLogin'
  })
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
</style>
